Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add structured dracon logging #190

Merged
merged 3 commits into from
Jun 5, 2024
Merged

add structured dracon logging #190

merged 3 commits into from
Jun 5, 2024

Conversation

northdpole
Copy link
Contributor

@northdpole northdpole commented Jun 3, 2024

This PR leverages Go's log/slog package to add a default logger to every logging statement we have in the project.
This allows us to change logging for all components easily and in the future be more flexible with smarter things like tracing or making groups out of our logs.

Enrichers do not have a base method for now so they don't get structured logging, this is coming in the next PR

@northdpole northdpole requested a review from ptzianos June 3, 2024 11:26
@northdpole northdpole force-pushed the structured-logging branch from 8d6d4c4 to 39bae1e Compare June 3, 2024 11:31
@northdpole northdpole mentioned this pull request Jun 3, 2024
@northdpole northdpole force-pushed the structured-logging branch 3 times, most recently from 468b655 to 9769adf Compare June 4, 2024 10:04
cmd/draconctl/main.go Outdated Show resolved Hide resolved
components/consumers/consumer.go Outdated Show resolved Hide resolved
components/consumers/consumer.go Outdated Show resolved Hide resolved
components/producers/producer.go Show resolved Hide resolved
components/consumers/consumer.go Outdated Show resolved Hide resolved
components/consumers/consumer_test.go Outdated Show resolved Hide resolved
components/producers/producer.go Show resolved Hide resolved
@northdpole northdpole force-pushed the structured-logging branch from cb2d5f7 to 04034cd Compare June 4, 2024 13:13
components/producers/producer.go Outdated Show resolved Hide resolved
components/producers/producer.go Show resolved Hide resolved
components/producers/producer.go Outdated Show resolved Hide resolved
components/producers/producer.go Outdated Show resolved Hide resolved
pkg/log/dracon-logger.go Outdated Show resolved Hide resolved
components/producers/producer.go Show resolved Hide resolved
@northdpole northdpole force-pushed the structured-logging branch from 723dfb2 to 5d8be44 Compare June 4, 2024 15:46
@northdpole northdpole force-pushed the structured-logging branch from 5d8be44 to 8696501 Compare June 5, 2024 10:42
@northdpole northdpole force-pushed the structured-logging branch from 8696501 to e50b519 Compare June 5, 2024 11:06
pkg/log/dracon-logger.go Outdated Show resolved Hide resolved
components/consumers/consumer.go Outdated Show resolved Hide resolved
@ptzianos ptzianos merged commit db05659 into main Jun 5, 2024
3 checks passed
@ptzianos ptzianos deleted the structured-logging branch June 5, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants